﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="EM.admin.content._default" %>

<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="radA" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="radG" %>
<%@ Register Src="~/Common/Header.ascx" TagName="Header" TagPrefix="uc2" %>
<%@ Register Src="~/Common/PageName.ascx" TagName="PageName" TagPrefix="uc1" %>
<%@ Register Src="~/Common/Footer.ascx" TagName="Footer" TagPrefix="uc4" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link id="Link1" runat="server" href="~/css/master.css" rel="stylesheet" type="text/css" />
    <link id="Link2" runat="server" href="~/css/buttons.css" rel="stylesheet" type="text/css" />
    <script src="../../js/PopUp.js" type="text/javascript"></script>
    <script type="text/javascript">
        var rgMaster;

        var rgMaster;

        function GridCreated() {
            rgMaster = this;
            if (rgMaster.MasterTableView.Rows.length) {
                rgMaster.MasterTableView.SelectRow(rgMaster.MasterTableView.Rows[0].Control, true);
            }
        }
        function btnInsert_OnClick() {
            openWin('Default_edit.aspx?task=Insert&ID=-1', '', 1, 950, 600);
        }
        function btnUpdate_OnClick(ID) {
            openWin('Default_edit.aspx?task=Update&ID=' + ID, '', 1, 950, 600);
        }

        function btnDelete_OnClick(ID) {
            openWin('Default_edit.aspx?task=Delete&ID=' + ID, '', 1, 950, 600);
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
        <tr>
            <td class="TdMainTop">
                <uc2:Header ID="Header1" runat="server"></uc2:Header>
            </td>
        </tr>
        <tr>
            <td class="TdMainContent" valign="top">
                <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="TdPageName" colspan="2">
                            <uc1:PageName ID="ucPageName" PAGEID="15" runat="server" SHOWBOOKMARKBUTTON="true">
                            </uc1:PageName>
                        </td>
                    </tr>
                    <tr>
                        <td id="TdMainRight" valign="top">
                            <div id="ContentRight">
                                <div class="SearchBox" style="width: 700px">
                                    <table border="0" cellspacing="5" cellpadding="0" width="100%">
                                        <tr>
                                            <td>
                                                <label>
                                                    <asp:Label ID="lblCONTENTID" runat="server"></asp:Label>:</label>
                                            </td>
                                            <td>
                                                <asp:TextBox CssClass="Editinput" ID="txtCONTENTID" runat="server" Width="150"></asp:TextBox>
                                                <asp:CompareValidator ID="cvCONTENTID" runat="server" ValidationGroup="vgsearch"
                                                    ControlToValidate="txtCONTENTID" Display="None" Operator="DataTypeCheck" Type="Integer"
                                                    Width="0"></asp:CompareValidator>
                                                <asp:ValidationSummary ID="vssearch" runat="server" DisplayMode="BulletList" ValidationGroup="vgsearch"
                                                    ShowMessageBox="true" Width="0" ShowSummary="false" />
                                            </td>
                                            <td>
                                                <label>
                                                    <asp:Label ID="lblADM_CONTENT_TYPE" runat="server"></asp:Label>:</label>
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlADM_CONTENT_TYPE" runat="server" Width="150">
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <label>
                                                    <asp:Label ID="lblCONTENTNAME" runat="server"></asp:Label>:</label>
                                            </td>
                                            <td>
                                                <asp:TextBox CssClass="Editinput" ID="txtCONTENTNAME" runat="server" Width="150"></asp:TextBox>
                                            </td>
                                            <td>
                                                <label>
                                                    <asp:Label ID="lblLANGCODE" runat="server"></asp:Label>:</label>
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlLANGCODE" runat="server" Enabled="false" Width="150">
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="btnSearch" ValidationGroup="vgsearch" Style="float: right;" CssClass="btn_left xp_find"
                                                    runat="server" OnClick="btnSearch_Click">
                                                    <strong class="btn_rigth_xp xp">
                                                        <asp:Label ID="lblSearch" runat="server"></asp:Label>
                                                    </strong>
                                                </asp:LinkButton>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div id="GrdDivMaster">
                                    <radG:RadGrid ID="rgMaster" runat="server" Skin="master" GridLines="None" PageSize="20"
                                        AllowPaging="True" AllowSorting="True" ShowStatusBar="true" Width="700" AutoGenerateColumns="False"
                                        EnableAJAX="true" LoadingTemplateTransparency="55" EnableAJAXLoadingTemplate="True"
                                        OnNeedDataSource="rgMaster_NeedDataSource" OnItemDataBound="rgMaster_ItemDataBound">
                                        <PagerStyle Mode="NumericPages" />
                                        <ClientSettings Selecting-AllowRowSelect="false">
                                        </ClientSettings>
                                        <MasterTableView GridLines="None" DataKeyNames="CONTENTID">
                                            <Columns>
                                                <radG:GridBoundColumn UniqueName="CONTENTID" HeaderText="İçerik No" DataField="CONTENTID">
                                                    <HeaderStyle Width="75" HorizontalAlign="left" />
                                                    <ItemStyle Width="75" HorizontalAlign="left" />
                                                </radG:GridBoundColumn>
                                                <radG:GridBoundColumn UniqueName="CONTENTNAME" HeaderText="İsim" DataField="CONTENTNAME">
                                                    <HeaderStyle HorizontalAlign="left" />
                                                    <ItemStyle HorizontalAlign="left" />
                                                </radG:GridBoundColumn>
                                                <radG:GridBoundColumn UniqueName="LOOKUPNAME" HeaderText="Tipi" DataField="LOOKUPNAME">
                                                    <HeaderStyle HorizontalAlign="left" Width="100" />
                                                    <ItemStyle HorizontalAlign="left" />
                                                </radG:GridBoundColumn>
                                                <radG:GridTemplateColumn AllowFiltering="false" HeaderText="İşlemler">
                                                    <HeaderStyle Width="30px" HorizontalAlign="left" />
                                                    <ItemStyle Width="30px" HorizontalAlign="Center" />
                                                    <ItemTemplate>
                                                        <a href='javascript:btnUpdate_OnClick(<%#Eval("CONTENTID")%>)'>Güncelle</a>
                                                    </ItemTemplate>
                                                </radG:GridTemplateColumn>
                                            </Columns>
                                        </MasterTableView>
                                    </radG:RadGrid>
                                    <br />
                                    <div style="width: 700px;">
                                        <a onclick="btnInsert_OnClick()" class="btn_left xp_add"><strong class="btn_rigth_xp xp">
                                            Ekle</strong> </a>
                                    </div>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="vertical-align: bottom;" class="MasterFooter">
                <uc4:Footer ID="Footer1" runat="server"></uc4:Footer>
            </td>
        </tr>
    </table>
    <radA:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <radA:AjaxSetting AjaxControlID="btnSearch">
                <UpdatedControls>
                    <radA:AjaxUpdatedControl ControlID="rgMaster" />
                </UpdatedControls>
            </radA:AjaxSetting>
        </AjaxSettings>
    </radA:RadAjaxManager>
    </form>
</body>
</html>
